/*
 * @Description: 权限管理
 * @Author: fxg
 * @Date: 2020-06-30 14:18:14
 * @LastEditors: wangwangwang
 * @LastEditTime: 2021-04-06 10:10:12
 */
import request from '@/utils/request'
import Longrequest from '@/utils/Longrequest'
export function batchUpdateOrDelete(data) {
  return request({
    url: '/base/system/function/limits/batch_update_or_delete',
    method: 'post',
    data
  })
}
export function saveOrUpdate(data) {
  return Longrequest({
    url: '/base/system/function/limits/save_or_update',
    method: 'post',
    data,
  })
}
export function queryIds(data) {
  return request({
    url: '/base/system/function/limits/get_checked_button_list',
    method: 'post',
    data
  })
}
export function queryIds1(data) {
  return request({
    url: '/base/system/function/limits/get_second_checked_button_list',
    method: 'post',
    data
  })
}
export function queryIdsReverse(params) {
  return request({
    url: '/base/system/function/limits/query_ids_reverse',
    method: 'get',
    params
  })
}
export function functionTree(params) {
  return request({
    url: '/base/system/function/manager/get_system_function_button',
    method: 'get',
    params
  })
}
// 个人权限授权 权限分配 -获取功能、按钮权限列表
export function get_system_function_buttonByuser(params) {
  return request({
    url: '/base/system/function/manager/get_system_function_buttonByuser',
    method: 'get',
    params
  })
}
/*数据权限*/
export function get_table_title(params) {
  return request({
    url: '/base/system/data/limits/get_table_title',
    method: 'get',
    params
  })
}
export function query_table_data(params) {
  return request({
    url: '/base/system/data/limits/query_table_data',
    method: 'post',
    data: params
  })
}
export function save_or_update(data) {
  return request({
    url: '/base/system/data/limits/join/save_or_update',
    method: 'post',
    data
  })
}
/*数据回显*/
export function get_data_limits_settings(params) {
  return request({
    url: '/base/system/data/limits/join/get_data_limits_settings',
    method: 'get',
    params
  })
}
/*数据回显*/
export function get_data_limits_second_settings(params) {
  return request({
    url: '/base/system/data/limits/join/get_data_limits_second_settings_v2',
    method: 'get',
    params
  })
}
/*表格回显*/
export function get_data_limits_table_settings(params) {
  return request({
    url: '/base/system/data/limits/join/get_data_limits_table',
    method: 'get',
    params
  })
}

/*表格回显*/
export function getDataLimitsTableForUser(params) {
  return request({
    url: '/base/system/data/limits/join/get_data_limits_table_for_user',
    method: 'get',
    params
  })
}

/**
 * @Description: 最后一步授权
 * @Param: 
 * @Author: wangwangwang
 * @param {*} params
 */
export function setPermisssion(params) {
  return request({
    url: '/base/system/limits/apply/update_apply_status',
    method: 'get',
    params
  })
}
